package com.demo.user;

import com.demo.model.Blog;
import com.demo.service.OpuserService;
import com.jfinal.core.Controller;
import com.jfinal.log.Logger;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.spring.Inject;

public class UserController extends Controller {

	private Logger logger = Logger.getLogger(getClass());
	@Inject.BY_TYPE
	private OpuserService userService;
	
	public void bloglistByUser(){
		Page<Blog> page = userService.relation(getParaToInt(0, 1) , getParaToInt(1, 1));
		setAttr("blogPage", page);
		render("user.html");
	}
	
	

}
